home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
newmarch.zip
/
SCROLLED
< prev
Wrap
Text File
|
1992-09-08
|
2KB
|
75 lines
/* Author: $Author: jan $
* File: $Source: /usr/usrs/jan/desktop/X_Book.boo/programs/RCS/scrolled-text.c,v $
* Date: $Date: 1992/09/09 00:10:08 $
* Revision: $Revision: 1.1 $
*/
#include "copyright.h"
#include <stdio.h>
#include <Xm/Text.h>
#include <Xm/ScrolledW.h>
/*-------------------------------------------------------------
** Forward Declarations
*/
void main (); /* main logic for application */
void CreateApplication (); /* create main window */
/*-------------------------------------------------------------
** Global Variables
*/
#define MAX_ARGS 20
#define Class_name "ScrolledText"
Display *display; /* the display device */
int screen; /* the screen on the display */
Window scrolledtext;/* the scrolled text widget */
/*-------------------------------------------------------------
** main - main logic for application
*/
void main (argc,argv)
unsigned int argc;
char **argv;
{
Widget app_shell; /* ApplicationShell */
/* Initialize toolkit, open the display and create the toplevel widget. */
app_shell = XtInitialize(argv[0], /* application name */
Class_name, /* class name */
NULL, /* options */
0, /* number of options */
&argc, argv);
/* set up all the sub-widgets */
CreateApplication(app_shell);
XtRealizeWidget (app_shell);
/* Get and dispatch events.
*/
XtMainLoop ();
}
/*-------------------------------------------------------------
** CreateApplication - create main window
*/
void CreateApplication (parent)
Widget parent; /* parent widget */
{
Arg args[MAX_ARGS]; /* arg list */
register int n; /* arg count */
n = 0;
XtSetArg (args[n], XmNwidth, 200); n++;
XtSetArg (args[n], XmNheight, 100); n++;
XtSetArg (args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++;
scrolledtext = XmCreateScrolledText (parent, "scrolledText", args, n);
XtManageChild (scrolledtext);
}